package com.datatypes;

import java.io.Serializable;

public class GeoPtr implements Serializable {

        /** the speed is in m/s **/
        float speed;
        long time;
        double altitude;
        double latitude;
        double longitude;
        double calorie = 0;

        public double getLatitude() {
                return latitude;
        }

        public double getLongitude() {
                return longitude;
        }

        public GeoPtr()
        {
        	this.latitude = 0;
            this.longitude = 0;
            this.time = 0;
            this.altitude = 0;
            this.speed = 0;
        }
        
        public GeoPtr(double latitude, double longitude, long time, float speed,
                        double altitude) {
                this.latitude = latitude;
                this.longitude = longitude;
                this.time = time;
                this.altitude = altitude;
                if (speed * 3.6 < 1)
                        this.speed = 0;
                else
                        this.speed = speed;
        }

        /** get the speed in km/h **/
        public double GetSpeed() {
                return speed * 3.6;
        }

        public double getAltitude() {
                return altitude;
        }

        public double getTime() {
                return ((double) (time / 1000)) / 60;
        }

        public long getMS() {
                return time;
        }

        public double getCalories() {

                return calorie;
        }

		public void setCalories(double updateCaloriesBurned) {
			this.calorie = updateCaloriesBurned;
		}
		
}